﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="GUESTSMANAGEMENT.View.WebUserControl1" %>
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>

<ext:DesktopWindow ID="winGrdGuestsList" runat="server" Collapsible="true" Icon="Group" Title="Lista de Convidados" Width="900" Height="600">
    <Body>
        <ext:Hidden ID="txt_idGuestsList" runat="server"></ext:Hidden>
        <ext:Store ID="listStore" runat="server" OnRefreshData="MyData_Refresh">
            <Reader>
                <ext:ArrayReader>
                    <Fields>
                        <ext:RecordField Name="listGuestsId" />
                        <ext:RecordField Name="guestsName" />
                        <ext:RecordField Name="guestsPhone" />
                        <ext:RecordField Name="userName" />
                        <ext:RecordField Name="eventName" />
                    </Fields>
                </ext:ArrayReader>
            </Reader>
        </ext:Store>
        <ext:FitLayout ID="FitLayout1" runat="server">
            <ext:GridPanel ID="GridPanel" 
                runat="server"
                StoreID="listStore"
                StripeRows="true"
                Width="250" 
                Height="290">
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ColumnID="guestsName" Header="Nome" Width="150" DataIndex="guestsName" Sortable="true" >
                            <Editor>
                                <ext:TextField ID="TextField1" AllowBlank="false" runat="server" /> 
                            </Editor>
                        </ext:Column>
                        <ext:Column ColumnID="guestsPhone" Header="Telefone" Width="110" DataIndex="guestsPhone" Sortable="true" >
                            <Editor>
                                <ext:TextField ID="TextField2" AllowBlank="false" runat="server" />
                            </Editor>
                        </ext:Column>
                        <ext:Column ColumnID="promoter" Header="Promoter" Width="100" DataIndex="userName" Sortable="true" />
                        <ext:Column ColumnID="event" Header="Evento" Width="100" DataIndex="eventName" Sortable="true" />
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <ext:PagingToolBar ID="PagingToolBar" runat="server" PageSize="10" StoreID="listStore" />
                </BottomBar>
            </ext:GridPanel>
        </ext:FitLayout>
    </Body>
</ext:DesktopWindow>